package service;

import java.sql.ResultSet;
import java.util.List;

import dao.UserDao;


public class UserService {
	
	public boolean addUser(String username, String password, String explains) {
		UserDao mu = new UserDao();
		int i = mu.add(username, password, explains);
		return i!=0;
	}
	public List getUserInfos() {
		UserDao mu = new UserDao();
		return mu.select();
	}
	public boolean updateUser(String username, String password, String explains, String id) {
		UserDao mu = new UserDao();
		int i = mu.update(username, password, explains, id);
		return i!=0;
	}
	public static void main(String[] args) {
		UserService userService = new UserService();
//		userService.addUser("23", "77", "3");//success
//		userService.getUserInfos();//fail
//		userService.updateUser("24", "224", "2224", "14");//success
	}
}
